# -*- cperl -*-
{
    my $s = <<"____END_EXPECT";
ok, dir t
ok, file foo
.
trick1.txt
ok, trick1.txt, [t], [foo]
.
trick2.txt
ok, trick2.txt, [t], [foo]
.
trick3.txt
ok, trick3.txt, [t], [foo]
anything: foo
anything: bar
contents: 
.
trick1.txt
.
trick2.txt
.
trick3.txt
ok, [trick1.txt trick2.txt trick3.txt], [trick1.txt trick2.txt trick3.txt], [foo bar cat]
____END_EXPECT
    ;
    my @r;
    do { push @r, $_ if !m/^smart:.+$/ } for @result;
    my $r = join '', @r;
    $check_result = $r eq $s;
    $_ = "$file.log";
    unlink if -f;
    do {
        open F, ">$file.log" or die "$!";
        print F "==================== expecting ==\n";
        print F $s;
        print F "\n";
        print F "==================== received ===\n";
        print F $r;
        close F;
    } unless $check_result;
    print "";
}
